package com.gxa.saas.portal.service.impl;

import com.gxa.saas.portal.entity.vo.wylvo.OrderInfoVO;
import com.gxa.saas.portal.entity.vo.wylvo.OrderVo;
import com.gxa.saas.portal.mapper.WOrderMapper;
import com.gxa.saas.portal.service.WOrderService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class WOrderServiceImpl implements WOrderService {


    @Resource
    private WOrderMapper wOrderMapper;


    @Override
    public List<OrderInfoVO> orderData(Integer shopid) {
        List<OrderInfoVO> orderData = wOrderMapper.orderData(shopid);
        return orderData;
    }

    @Override
    public List<OrderInfoVO> selectByStatus(Integer shopid,Integer status) {
        List<OrderInfoVO> list = wOrderMapper.selectByStatus(shopid, status);
        return list;
    }

    @Override
    public void delectOrder(Integer id) {
           wOrderMapper.delectOrder(id);
    }

    @Override
    public void updateOrder(OrderVo order) {
          wOrderMapper.updateOrder(order);
    }

    @Override
    public Integer countNewOrder(Integer sid) {
        Integer newOrder = wOrderMapper.countNewOrder(sid);
        return newOrder;
    }
}
